<template>
  <div>
    <div>
      <div>测试组件的add值：{{add}}</div>
      <div>123</div>
      <slot name="xf"></slot>
      <div>{{ffff}}</div>
      <slot></slot>
      <el-button type="primary" @click="dodata" >相加</el-button>
    </div>
  </div>
</template>
           
<script>
export default{
  name: 'test',
  props:{
    add: {
      type: [String,Number],
      default: '1'
    },
    ffff:{
      type: [String,Number],
      default: 'ffff'
    },
  },
  methods:{
    dodata(){
      const yy = this.add + this.ffff
      this.$emit('yjf', yy)
    }
  } 
}
</script>
<style lang='less' scoped>
            
</style>